<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>unescape</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Smarty 3 Manual">
<link rel="up" href="language.modifiers.html" title="Chapter 5. Variable Modifiers">
<link rel="prev" href="language.modifier.truncate.html" title="truncate">
<link rel="next" href="language.modifier.upper.html" title="upper">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">unescape</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="language.modifier.truncate.html">Prev</a> </td>
<th width="60%" align="center">Chapter 5. Variable Modifiers</th>
<td width="20%" align="right"> <a accesskey="n" href="language.modifier.upper.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="sect1" title="unescape">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="language.modifier.unescape"></a>unescape</h2></div></div></div>
<p>
     <code class="varname">unescape</code> is used to decode <code class="literal">entity</code>,
     <code class="literal">html</code> and <code class="literal">htmlall</code>. It counters the effects
     of the <a class="link" href="language.modifier.escape.html" title="escape">escape modifier</a> for the given types.
    </p>
<div class="informaltable"><table border="1">
<colgroup>
<col align="center">
<col align="center">
<col align="center">
<col align="center">
<col align="center">
<col>
</colgroup>
<thead><tr>
<th align="center">Parameter Position</th>
<th align="center">Type</th>
<th align="center">Required</th>
<th align="center">Possible Values</th>
<th align="center">Default</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td align="center">1</td>
<td align="center">string</td>
<td align="center">No</td>
<td align="center">
<code class="literal">html</code>, <code class="literal">htmlall</code>,
              <code class="literal">entity</code>,
       </td>
<td align="center"><code class="literal">html</code></td>
<td>This is the escape format to use.</td>
</tr>
<tr>
<td align="center">2</td>
<td align="center">string</td>
<td align="center">No</td>
<td align="center">
<code class="literal">ISO-8859-1</code>, <code class="literal">UTF-8</code>,
      and any character set supported by
      <a class="ulink" href="http://php.net/htmlentities" target="_top">
      <code class="varname">htmlentities()</code></a>
      </td>
<td align="center"><code class="literal">UTF-8</code></td>
<td>The character set encoding passed to html_entity_decode() or htmlspecialchars_decode() or mb_convert_encoding() et. al.</td>
</tr>
</tbody>
</table></div>
<div class="example">
<a name="id357791"></a><p class="title"><b>Example 5.22. escape</b></p>
<div class="example-contents">
<pre class="programlisting">

&lt;?php

$smarty-&gt;assign('articleTitle',
                "Germans use &amp;quot;&amp;Uuml;mlauts&amp;quot; and pay in &amp;euro;uro"
                );

?&gt;

   </pre>
<p>
   These are example <code class="literal">unescape</code> template lines followed by the output
   </p>
<pre class="programlisting">

{$articleTitle}
Germans use &amp;quot;&amp;Uuml;mlauts&amp;quot; and pay in &amp;euro;uro

{$articleTitle|unescape:"html"}
Germans use "&amp;Uuml;mlauts" and pay in &amp;euro;uro

{$articleTitle|unescape:"htmlall"}
Germans use "Ümlauts" and pay in €uro

   </pre>
</div>
</div>
<br class="example-break"><p>
   See also
   <a class="link" href="language.escaping.html" title="Escaping Smarty Parsing">escaping smarty parsing</a>,
   <a class="link" href="language.modifier.escape.html" title="escape">escape modifier</a>.
  </p>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="language.modifier.truncate.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="language.modifiers.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="language.modifier.upper.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">truncate </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> upper</td>
</tr>
</table>
</div>
</body>
</html>
